package com.blt.car.me;

import android.widget.TextView;

import com.blt.car.R;
import com.blt.car.base.BaseTitleBarActivity;
import com.blt.car.base.ViewHolder;
import com.blt.car.utils.StringUtils;

import blt.app_core.api.base.CoreManager;
import blt.app_core.api.journey.JourneyApi;
import blt.app_core.api.journey.bean.AppealInfo;

/**
 * Created by xgp on 2017/6/24.
 */

public class ComplaintDetailActivity extends BaseTitleBarActivity {
    private TextView tvDay;
    private TextView tvNo;
    private TextView tvResult;
    private TextView tvContent;

    AppealInfo appealInfo;


    @Override
    protected int getLayoutId() {
        return R.layout.activity_complaint_detail;
    }

    @Override
    protected void initData() {
        super.initData();
        appealInfo = (AppealInfo) getIntent().getExtras().getSerializable("appealId");
//        CoreManager.getCore(JourneyApi.class).getAppealDetail(appealId);
    }

    @Override
    protected void initView(ViewHolder holder) {
        mTitleBar.setTitle("申诉详情");
        tvDay = holder.get(R.id.complaint_detail_day);
        tvNo = holder.get(R.id.complaint_detail_no);
        tvContent = holder.get(R.id.complaint_detail_content);
        tvResult = holder.get(R.id.complaint_detail_result);

        if (appealInfo != null) {
            tvDay.setText(StringUtils.getHanZiDay(appealInfo.createTime));
            tvNo.setText(String.valueOf(appealInfo.travelOrderId));
            tvContent.setText(appealInfo.appealDetail);
            tvResult.setText(appealInfo.reason);
        }
    }
}
